package com.unlcn.ils.erpInterfaces.service.buss.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.unlcn.ils.erpInterfaces.dao.mapper.TmshipstatusCompassMapper;
import com.unlcn.ils.erpInterfaces.dao.model.TmshipstatusCompass;
import com.unlcn.ils.erpInterfaces.service.buss.ITmshipstatusCompassService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * ${table.comment}  服务实现类
 * </p>
 *
 * @author liangpeng
 * @since 2018-10-10
 */
@Service
public class TmshipstatusCompassServiceImpl extends ServiceImpl<TmshipstatusCompassMapper, TmshipstatusCompass> implements ITmshipstatusCompassService {

    /**
     * 根据指令和状态查找康舶司的调度指令状态
     *
     * @param ishipId
     * @param istat
     * @param isource
     * @return
     */
    @Override
    public TmshipstatusCompass gettmsShipstatus(Long ishipId, Long istat, Integer isource) {
        EntityWrapper<TmshipstatusCompass> ew = new EntityWrapper<>();
        ew.eq("ISHIPID",ishipId).eq("ISTAT",istat).eq("ISOURCE",isource);
        return this.selectOne(ew);
    }

    /**
     * @return
     */
    @Override
    public Long getNextIlineid() {
        return baseMapper.getNextIlineid();
    }
}
